package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-10-12  11:04
 * @Description:携带过来的实体内容
 */
public class PaintBookingPayFee implements Parcelable {

    /**
     * payTypeList : [{"amount":0,"payType":1,"payTypeName":"喷涂币支付"},{"payType":2,"payTypeName":"微信支付"},{"payType":3,"payTypeName":"支付宝支付"}]
     * price : 44
     * siteList : [{"price":24,"siteNo":"三楼02门","siteTimeSpans":[{"rentBeginTime":"2023-10-12 08:00:00","rentEndTime":"2023-10-12 09:00:00","siteTimeSpanId":43,"spraySiteId":0,"timeLength":60,"timeSpanLabel":"08:00-09:00","usable":""},{"rentBeginTime":"2023-10-12 09:10:00","rentEndTime":"2023-10-12 10:10:00","siteTimeSpanId":44,"spraySiteId":0,"timeLength":60,"timeSpanLabel":"09:10-10:10","usable":""}],"spraySiteId":3},{"price":20,"siteNo":"三楼01门","siteTimeSpans":[{"rentBeginTime":"2023-10-12 08:00:00","rentEndTime":"2023-10-12 09:00:00","siteTimeSpanId":31,"spraySiteId":0,"timeLength":60,"timeSpanLabel":"08:00-09:00","usable":""},{"rentBeginTime":"2023-10-12 09:10:00","rentEndTime":"2023-10-12 10:10:00","siteTimeSpanId":32,"spraySiteId":0,"timeLength":60,"timeSpanLabel":"09:10-10:10","usable":""}],"spraySiteId":4}]
     * useTime : 2023-10-12 00:00:00
     */

    //待支付的价格
    private BigDecimal price;

    //用户选择的预约日期
    private String useTime;

    //是否时可以支付的
    private transient boolean isPay;

    //不可以支付内容，那个时间段，要灭掉勾选，因为别人已经选了并且付款了已经，约走了
    private transient List<String> unSelectedSpanIds = new ArrayList<>();

    //支付方式的列表
    private List<PayTypeListBean> payTypeList = new ArrayList<>();

    private List<BookingOutsideBean> siteList = new ArrayList<>();


    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getUseTime() {
        return useTime;
    }

    public void setUseTime(String useTime) {
        this.useTime = useTime;
    }

    public List<PayTypeListBean> getPayTypeList() {
        return payTypeList;
    }

    public void setPayTypeList(List<PayTypeListBean> payTypeList) {
        this.payTypeList = payTypeList;
    }

    public List<BookingOutsideBean> getSiteList() {
        return siteList;
    }

    public void setSiteList(List<BookingOutsideBean> siteList) {
        this.siteList = siteList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public boolean isPay() {
        return isPay;
    }

    public void setPay(boolean pay) {
        isPay = pay;
    }


    public List<String> getUnSelectedSpanIds() {
        return unSelectedSpanIds;
    }

    public void setUnSelectedSpanIds(List<String> unSelectedSpanIds) {
        this.unSelectedSpanIds = unSelectedSpanIds;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeSerializable(this.price);
        dest.writeString(this.useTime);
        dest.writeTypedList(this.payTypeList);
        dest.writeTypedList(this.siteList);
    }

    public void readFromParcel(Parcel source) {
        this.price = (BigDecimal) source.readSerializable();
        this.useTime = source.readString();
        this.payTypeList = source.createTypedArrayList(PayTypeListBean.CREATOR);
        this.siteList = source.createTypedArrayList(BookingOutsideBean.CREATOR);
    }

    public PaintBookingPayFee() {
    }

    protected PaintBookingPayFee(Parcel in) {
        this.price = (BigDecimal) in.readSerializable();
        this.useTime = in.readString();
        this.payTypeList = in.createTypedArrayList(PayTypeListBean.CREATOR);
        this.siteList = in.createTypedArrayList(BookingOutsideBean.CREATOR);
    }

    public static final Parcelable.Creator<PaintBookingPayFee> CREATOR = new Parcelable.Creator<PaintBookingPayFee>() {
        @Override
        public PaintBookingPayFee createFromParcel(Parcel source) {
            return new PaintBookingPayFee(source);
        }

        @Override
        public PaintBookingPayFee[] newArray(int size) {
            return new PaintBookingPayFee[size];
        }
    };
}
